package com.ruoyi.partybuilding.domain;

import java.util.Date;

import com.easy.query.core.annotation.Column;
import com.easy.query.core.annotation.EasyWhereCondition;
import com.easy.query.core.annotation.Table;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.partybuilding.common.EQuery.IDeptEntity;
import com.ruoyi.partybuilding.common.EQuery.IEQueryEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.*;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * 班子成员对象 pb_team_person
 * 
 * @author he-liangliang@outlook.com
 * @date 2024-11-27
 */
@ApiModel(value = "班子人员信息",description = "班子人员信息")
@Table("pb_team_person")
@Data
public class TeamPerson extends IDeptEntity.LongId {
    //private static final long serialVersionUID = 1L;

    /** 党组织名称 ; */
    @ApiModelProperty(value = "组织名称")
    @Excel(name = "组织名称")
    private String deptName;


    /** 届数,冗余 ; */
//    @ApiModelProperty(value = "，不再使用,届数")
//    @Excel(name = "届数")
//    @Deprecated()
//    private Long year;

    /** 用户id ; */
    @ApiModelProperty(value = "用户id")
    @Excel(name = "用户id")
    @Min(value = 1,message = "用户id错误")
    private Long userId;

    /** 用户姓名 ; */
    @ApiModelProperty(value = "用户姓名")
    @Excel(name = "用户姓名")
    @NotBlank(message = "不能为空")
    @Size(min=1,max = 15,message = "用户名称应在5~15位")
    private String userName;

    /** 职务,字典team_duty ; */
    @ApiModelProperty(value = "职务,字典team_duty")
    @Excel(name = "职务,字典team_duty")
    private Long duty;

    /** 任职方式,字典值team_appointment ; */
    @ApiModelProperty(value = "任职方式,字典值team_appointment")
    @Excel(name = "任职方式,字典值team_appointment")
    private Long appointment;

    /** 任职时间 ; */
    @ApiModelProperty(value = "任职时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "任职时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date appointTime;

    /** 任职年限 ; */
    @ApiModelProperty(value = "任职年限",example = "任职年限")
    @Excel(name = "任职年限")
    private Long appointYear;

    /** 任职文号 ; */
    @ApiModelProperty(value = "任职文号")
    @Excel(name = "任职文号")
    private String appointCode;

    /** 行政职务 ; */
    @ApiModelProperty(value = "行政职务")
    @Excel(name = "行政职务")
    private String xzDuty;

    /** 排序 ; */
    @ApiModelProperty(value = "排序")
    @Excel(name = "排序")
    private Long sortNum;

    /** 照片地址 ; */
    @ApiModelProperty(value = "照片地址")
    @Excel(name = "照片地址")
    private String pictureUrl;

    /** 所属班子 ; */
    @ApiModelProperty(value = "所属班子")
    @Excel(name = "所属班子")
    private Long teamId;

    /** 状态 ; */
    @ApiModelProperty(value = "状态")
    @Excel(name = "状态")
    private Long status;



    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("deptId", getDeptId())
            .append("deptName", getDeptName())
            //.append("year", getYear())
            .append("userId", getUserId())
            .append("userName", getUserName())
            .append("duty", getDuty())
            .append("appointment", getAppointment())
            .append("appointTime", getAppointTime())
            .append("appointYear", getAppointYear())
            .append("appointCode", getAppointCode())
            .append("xzDuty", getXzDuty())
            .append("sortNum", getSortNum())
            .append("pictureUrl", getPictureUrl())
            .append("teamId", getTeamId())
            .append("status", getStatus())
            .toString();
    }
}
